<template>
	<view>
	<view class="row" v-for="(row,index) in couponValidList" :key="index" >
		<!-- 带描述信息 -->
		<uni-list>
			
			<uni-list-item title="加油好友" note="" :show-badge="true" badge-text="1">{{row.nickname}}</uni-list-item>
		</uni-list>
	</view>
	<!-- #ifdef MP-WEIXIN -->
	<button style="border-radius:100px;border-color: #FFFFFF;" open-type="share">
	      
	<image style="margin-left:-15upx;  width:80upx;height: 80upx;" src="http://120.55.49.138/ShopMall/static/img/share/wx.png"></image>
	</button>
	<!-- #endif -->
	</view>
	</view>
</template>

<script>
	import uniList from "@/components/uni-list/uni-list.vue"
	import uniListItem from "@/components/uni-list-item/uni-list-item.vue"
	export default {
	    components: {uniList,uniListItem},
		data() {
			return {
				free:0,
				recommendid:0,
				productname:'',
				couponValidList:[
					/* {id:1,title:"日常用品立减10元",termStart:"2019-04-01",termEnd:"2019-05-30",ticket:"10",criteria:"满50使用"},
					{id:2,title:"家用电器立减100元",termStart:"2019-04-01",termEnd:"2019-05-30",ticket:"100",criteria:"满500使用"},
					{id:3,title:"全场立减10元",termStart:"2019-04-01",termEnd:"2019-05-30",ticket:"10",criteria:"无门槛"},
					{id:4,title:"全场立减50元",termStart:"2019-04-01",termEnd:"2019-05-30",ticket:"50",criteria:"满1000使用"}
					 */
				],
			}
		},
		onShareAppMessage(res) {
		      return {
		        title: '各位好朋友们，快来帮帮我【'+this.productname+'】免费拿回家'+'竟然可以免费拿🙏🙏🙏',
		        path: '/pages/user/setting/mobilebind?cid='+this.recommendid+'',
				success: function(res) {
				      // 转发成功，可以把当前页面的链接发送给后端，用于记录当前页面被转发了多少次或其他业务
				     
				    },
				    fail: function(res) {
				      // 转发失败
				    },
		      }
		},
		onLoad(option) {
			
			//option为object类型，会序列化上个页面传递的参数
			console.log(option.cid); //打印出上个页面传递的参数。
			//console.log(option.free);
			console.log(option.name);
			//this.free = option.free==null?0:option.free;
			this.recommendid = option.cid==null?0:option.cid;
			this.productname = option.name==null?'':option.name;
			this.couponValidList = JSON.parse(decodeURIComponent(option.item));
		},
		
		methods: {
		}
	}
</script>

<style>
</style>
